import type { ComponentsConfig, ComponentsConfigRaw } from '../../types'
import { extendSchemas } from '@/components/cms/utils'
import advsConfig from './base/advs'
import { topFunction } from './simples'

const basePath = 'template.atlasDetails.content'
const config: ComponentsConfig = {
  default: 'atlasDetails',
  components: extendSchemas<ComponentsConfigRaw>(
    {
      topFunction: topFunction({
        sort: 1,
        fields: {
          topBar: {
            style: `${basePath}.topBar.style`
          }
        }
      })
    },
    advsConfig(['playerBeforeAdv', 'playerPauseAdv'])
  )
}
export default config
